import axiosHttp from "../../http"

//首页数据查询
async function homeData(data) {
  console.log(data)
  return axiosHttp({
    url: "/home/gethomedata",
    method: "get",
    data,
  }).then((res) => {
    return res
  })
}

//商品详情数据查询
async function shopDetail(data) {
  console.log(data)
  return axiosHttp({
    url: "/home/shopdetail",
    method: "post",
    data,
  }).then((res) => {
    return res
  })
}

//轮播数据
async function getRationData(data) {
  console.log(data)
  return axiosHttp({
    url: "/home/getrationdata",
    method: "get",
    data,
  }).then((res) => {
    return res
  })
}

export default {
  homeData,
  shopDetail,
  getRationData,
}
